fix mistranslation of case_ignore_strncmp.
authortsteven4 <tsteven4@gmail.com>
Fri, 6 Jun 2014 12:51:45 +0000 (12:51 +0000)
committertsteven4 <tsteven4@gmail.com>
Fri, 6 Jun 2014 12:51:45 +0000 (12:51 +0000)
gpsbabel/defs.h

index 8da17370c43ab425e61aa71da9b3baedb2a2f5cb..9fec3d2785aa97da9f9bfb68ca24db07b1ac49c3 100644 (file)
@@ -945,7 +945,7 @@ case_ignore_strcmp(const QString& s1, const QString& s2) {
 }
 // In 95% of the callers, this could be s1.startsWith(s2)...
 inline int case_ignore_strncmp(const QString& s1, const QString& s2, int n) {
-  return s1.left(n).compare(s2, Qt::CaseInsensitive);
+  return s1.left(n).compare(s2.left(n), Qt::CaseInsensitive);
 }
 
 int str_match(const char* str, const char* match);